#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main()
{
    int n1, n2 = 1, result = 1;
    scanf("%d", &n1);
    if (n1 == 0) {
        printf("1");
    }
    else if (n1 >= 1) {
        while (n2 <= n1) {
            result = result * n2;
            n2 = n2 + 1;
        }
        printf("%d", result);
    }
    return 0;
}